package router

import (
	"commodity-hub/hderlis"
	"net/http"

	"github.com/gin-gonic/gin"
)

func Init() *gin.Engine {
	// 1.创建路由
	r := gin.Default()

	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "hello World!")
	})

	r.POST("/dl", hderlis.Login)

	r.GET("/list", hderlis.List)

	r.POST("/lk", hderlis.Lk)
	return r
}
